package demoMod.stsconsole.cards.red;

import demoMod.stsconsole.cards.AbstractCard;
import demoMod.stsconsole.characters.AbstractPlayer;
import demoMod.stsconsole.core.AbstractCreature;
import demoMod.stsconsole.helpers.LocalizedStrings;
import demoMod.stsconsole.powers.BrutalityPower;

import java.util.List;

public class Brutality extends AbstractCard {
    public static final String ID = "Brutality";

    public Brutality() {
        super(ID);
        this.color = CardColor.RED;
        this.cost = 0;
        this.rarity = CardRarity.RARE;
        this.type = CardType.POWER;
        this.target = CardTarget.SELF;
    }

    @Override
    public void upgrade() {
        if (!this.upgraded) {
            this.upgraded = true;
            this.name = this.name + "+";
            this.upgradeTimes++;
            this.isInnate = true;
            List<String> cardStrings = LocalizedStrings.getCardStrings(this.id);
            this.description = cardStrings.get(2);
        }
    }

    @Override
    public boolean use(AbstractPlayer p, AbstractCreature target) {
        p.applyPower(p, new BrutalityPower(p, 1));
        return true;
    }
}
